/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package alcatelparser.modules.io;

import alcatelparser.modules.ApplicationSettings;
import alcatelparser.modules.I;

/**
 *
 * @author geniuz
 */
public class RecordsFilter
{

    public RecordsFilter()
    {
    }

    public final boolean isInFilter(long l)
    {
        //ApplicationSettings as = ApplicationSettings.getInstance();
        ///System.out.print(as.toString()+"\n");
        //String ii = I.I(4905);
        //System.out.print(ii+"\n");
        //String s = as.getProperty(ii);
        //System.out.print(s+"\n");
        //String s = ApplicationSettings.getInstance().getProperty(I.I(4905));
        String s = "all";
        if(I.I(4922).equals(s))
            return true;
        String s1 = ApplicationSettings.getInstance().getProperty(I.I(4926));
        String s2 = ApplicationSettings.getInstance().getProperty(I.I(4948));
        System.out.print(s1+"\n");
        System.out.print(s2+"\n");
        int i = Integer.parseInt(s1);
        int j = Integer.parseInt(s2);
        if(l > (long)j)
        {
            //ParseProcessor parseprocessor = (ParseProcessor)Env.getEnv().get(I.I(4968));
            //parseprocessor.setCurrentFileParseFinish();
        }
        return l >= (long)i && l <= (long)j;
    }

    public static final boolean validateInputNumber()
    {
        String s = ApplicationSettings.getInstance().getProperty(I.I(4905));
        if(I.I(4922).equals(s))
            return true;
        String s1 = ApplicationSettings.getInstance().getProperty(I.I(4926));
        String s2 = ApplicationSettings.getInstance().getProperty(I.I(4948));
        if(s1 == null || s2 == null)
        {
            return false;
        } else
        {
            Integer integer = Integer.valueOf(Integer.parseInt(s1));
            Integer integer1 = Integer.valueOf(Integer.parseInt(s2));
            return integer1.intValue() >= integer.intValue();
        }
    }
}
